|
swipefaststudios
Guest
|
 |
« on: April 09, 2016, 01:24:58 PM » |
|
I am starting to make a game and I am wondering which Library is better for making a 2D Platform Game. I have learned C# and C++ in school and want to use one of them to make a game for fun.
I have heard that C# is easier to make games with and most people make it with xna but SDL looks pretty good to make games with.
On the other hand I know there is a lot more documentation and a more active community in C++ and OpenGL but I do not know if it is a lot harder to make games with or if that matters at all.
If you have any opinions on this let me know. I am leaning towards C# and SDL library but just unsure if it is updated to work with current graphic cards since the website has articles last written in 2010 so I am guessing it isn't updated regularly.
So basically it is programming games in c# because it is easier or program a game in C++ because it has more documentation and updated website.
I am looking for developers experience with each language and which one they think is better to make a game with.
Thank you for your help!
|
|
|
|
« Last Edit: April 21, 2016, 02:23:17 PM by swipefaststudios »
|
Logged
|
|
|
|
|
oahda
|
 |
« Reply #1 on: April 10, 2016, 02:49:12 AM » |
|
SDL works with C++ too and you can always add OpenGL support later. My engine started out with vanilla SDL graphics and then I changed the rendering to use a custom OpenGL setup later, and I didn't have to recode the actual game stuff (but surely SDL for C# lets you use OpenGL as well, or is it so tied to Microsoft that it only allows either DirectX or nothing?).
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #2 on: April 10, 2016, 08:21:08 AM » |
|
SDL works with C++ too and you can always add OpenGL support later. My engine started out with vanilla SDL graphics and then I changed the rendering to use a custom OpenGL setup later, and I didn't have to recode the actual game stuff (but surely SDL for C# lets you use OpenGL as well, or is it so tied to Microsoft that it only allows either DirectX or nothing?).
Thanks for your opinion! I think in the end that it would be good for me to do C++ SDL and OpenGL because it has more documentation and seems better for making games. I also want a challenge in coding games and learn about different techniques to draw images on the screen and such. Thanks again for the help! Hopefully I start to make a game soon!
|
|
|
|
|
Logged
|
|
|
|
|
Shine Klevit
|
 |
« Reply #3 on: April 10, 2016, 08:50:03 AM » |
|
Well, it's all about understanding the purpose of C++, C#, SDL, XNA, and OpenGL.
It really matters what you're looking for. If your focus is ease of use over portability I would pick C# over C++. C++ is much better for portability, and more powerful(Albeit, it kind of sounds like you don't really need that much power. C# would probably function quite well). Yet, C# is much easier to code in.
If you want something a little more difficult that gives you significantly more power you probably want to go with OpenGL possibly using SDL as a front-end for input. SDL alone, however, functions pretty well if you're just interested in doing something simple. I mean, you can actually do some interesting stuff with pixel manipulation in SDL, but it's kind of tricky to do that in a way that's efficient.
I don't know if you would need SDL with C#. SDL's biggest advantage is portability, where as C# isn't really particularly geared for that(Albeit, I haven't looked into C# for a long time, and could be completely wrong about this). I think C# might actually have access to much easier alternatives that perform all of SDL's functions.
Then again, I may be more ignorant on these topics than I think I am.
|
|
|
|
|
Logged
|
|
|
|
|
Cheezmeister
|
 |
« Reply #4 on: April 10, 2016, 05:45:02 PM » |
|
Pedantically, XNA is dead. It was reborn as MonoGame, which is pretty healthy last I heard. Solid choice for a "lighter" Unity. It's the path of least resistance for your game, I suspect. I didn't know you could use SDL from C#, but it doesn't surprise me because SDL has bindings for everything under the sun. I would not recommend unless you *really* want SDL's API and *really* like C#. C++/SDL/GL is the canonical open-source, portable game stack. I love it personally but it takes some effort to do even the basics. I wrote this little skeleton, which you may find useful if you're intent on going that route (but be warned there's no sprite support): https://github.com/Cheezmeister/jambootFor a 2D platformer, you really don't need GL at all. SDL has decent 2D capabilities on its own, and it's way easier than 2D with GL, which was built primarily with 3D in mind. In any case: good luck!
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #5 on: April 10, 2016, 07:30:31 PM » |
|
C++/SDL/GL is the canonical open-source, portable game stack. I love it personally but it takes some effort to do even the basics. I wrote this little skeleton, which you may find useful if you're intent on going that route (but be warned there's no sprite support): https://github.com/Cheezmeister/jambootFor a 2D platformer, you really don't need GL at all. SDL has decent 2D capabilities on its own, and it's way easier than 2D with GL, which was built primarily with 3D in mind. In any case: good luck! Thanks I will have to take a look at your code, thanks for the helpful knowledge as well! C++ and SDL sounds very promising for me now!
|
|
|
|
|
Logged
|
|
|
|
|
oahda
|
 |
« Reply #6 on: April 11, 2016, 12:54:32 AM » |
|
Don't forget that SDL2 is out and so much better in case you'd missed that, tho I assume that's what you're implying by just saying SDL. So don't get old SDL!
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #7 on: April 11, 2016, 05:05:35 AM » |
|
I heard about it but I can't find the link, Do you have a link to the download of it?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #9 on: April 11, 2016, 07:35:59 AM » |
|
One More Question: What Editor or IDE should I use with SDL2? Does it matter what visual studio I use? Or do you recommend something else? thanks
|
|
|
|
« Last Edit: April 11, 2016, 07:43:17 AM by swipefaststudios »
|
Logged
|
|
|
|
|
oahda
|
 |
« Reply #10 on: April 11, 2016, 07:48:31 AM » |
|
Well, use whatever you prefer. I personally use Xcode, but that's Mac only, but Visual Studio is probably its Windows counterpart. Some people prefer full-blown IDE's and some do not.
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #11 on: April 11, 2016, 09:21:02 AM » |
|
Ok Thanks! I will probably use visual studio 2013 or something or 2015 since I only have windows!
|
|
|
|
|
Logged
|
|
|
|
Polly
Level 6
|
 |
« Reply #12 on: April 11, 2016, 09:53:19 AM » |
|
I will probably use visual studio 2013 or something or 2015 since I only have windows! If you decide on Visual Studio, you probably want to get "Visual Studio Community" ( which is free ). It's the successor to the "Express" series of Visual Studio, except that it's no longer a stripped-down version of the regular Visual Studio ( which costs money ). Do keep in mind that it's a behemoth of a application which will take some time to install & gobble up quite a few GBs on your hard-drive.
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #13 on: April 11, 2016, 09:55:20 AM » |
|
If you decide on Visual Studio, you probably want to get "Visual Studio Community" ( which is free ). It's the successor to the "Express" series of Visual Studio, except that it's no longer a stripped-down version of the regular Visual Studio ( which costs money ).
Do keep in mind that it's a behemoth of a application which will take some time to install & gobble up quite a few GBs on your hard-drive.
Okay thanks for the info! I will download it now! I have a bit of space on my hard drive so that will be okay 
|
|
|
|
|
Logged
|
|
|
|
|
oahda
|
 |
« Reply #14 on: April 11, 2016, 10:10:32 AM » |
|
One thing worth noting is that someone has been telling me their VS keeps adding backslashes in paths instead of the cross-compatible and UNIX-friendly forward slashes (#include "folder\file.h" instead of the almost universally preferred (and functional on Windows as well) #include "file/path.h"), so watch out for that and other possible windowsisms that VS might throw upon you and perhaps try to see if you can turn those off. Give it a web search.
|
|
|
|
|
Logged
|
|
|
|
|
swipefaststudios
Guest
|
 |
« Reply #15 on: April 11, 2016, 10:15:05 AM » |
|
One thing worth noting is that someone has been telling me their VS keeps adding backslashes in paths instead of the cross-compatible and UNIX-friendly forward slashes (#include "folder\file.h" instead of the almost universally preferred (and functional on Windows as well) #include "file/path.h"), so watch out for that and other possible windowsisms that VS might throw upon you and perhaps try to see if you can turn those off. Give it a web search.
Thanks for the heads up, I will keep that in mind!
|
|
|
|
|
Logged
|
|
|
|
|
InfiniteStateMachine
|
 |
« Reply #16 on: April 11, 2016, 10:17:47 AM » |
|
One thing worth noting is that someone has been telling me their VS keeps adding backslashes in paths instead of the cross-compatible and UNIX-friendly forward slashes (#include "folder\file.h" instead of the almost universally preferred (and functional on Windows as well) #include "file/path.h"), so watch out for that and other possible windowsisms that VS might throw upon you and perhaps try to see if you can turn those off. Give it a web search.
Yeah it's very annoying that this is the default behavior. To make it use forward slashes go Options -> Text Editor -> C/C++ -> Advanced and set Use forward slash in #include to true
|
|
|
|
|
Logged
|
|
|
|
|
oahda
|
 |
« Reply #17 on: April 11, 2016, 10:18:38 AM » |
|
Can it handle UNIX newlines these days too?
Also I remember trying VS many years ago and it added some extra files when all I wanted was a main.cpp and nothing else. Does it still do that / are those necessary / do they interfere with portability? Maybe I just chose the wrong project template?
|
|
|
|
|
Logged
|
|
|
|
Polly
Level 6
|
 |
« Reply #18 on: April 11, 2016, 10:52:09 AM » |
|
Also I remember trying VS many years ago and it added some extra files when all I wanted was a main.cpp and nothing else. Does it still do that / are those necessary / do they interfere with portability? Maybe I just chose the wrong project template? You probably forgot to enable the "empty project" option. Otherwise Visual Studio automatically adds some boilerplate code / files and configures your project to use precompiled headers.
|
|
|
|
|
Logged
|
|
|
|
|
InfiniteStateMachine
|
 |
« Reply #19 on: April 11, 2016, 11:32:13 AM » |
|
Can it handle UNIX newlines these days too?
Also I remember trying VS many years ago and it added some extra files when all I wanted was a main.cpp and nothing else. Does it still do that / are those necessary / do they interfere with portability? Maybe I just chose the wrong project template?
Yeah I think polly is right. Sounds like you might have picked win32 console app rather than a empty command line app. If that happens it adds a bunch of crap like stdafx.h (their precompiled header stuff). I'm pretty sure the stdafx stuff is not portable (I've never actually used it so I'm not totally sure). You should just have the 1 file when generating a new commandline project.
|
|
|
|
|
Logged
|
|
|
|
|